The Applied TensorFlow and Keras Workshop by Harveen Singh Chadha Luis Capelo

The Applied TensorFlow and Keras Workshop by Harveen Singh Chadha Luis Capelo

Author:Harveen Singh Chadha, Luis Capelo
Language: eng
Format: epub
Publisher: Packt Publishing Pvt Ltd
Published: 2020-07-29T00:00:00+00:00


Figure 2.24: Graph that shows the results of the loss function evaluated at each epoch

Note

This compares what the model predicted at each epoch, and then compares that with the real data using a technique called mean-squared error. This plot shows those results.

At a glance, our network seems to perform very well; it starts with a very small error rate that continuously decreases. Now that we have lowered the error rate, let's move on to make some predictions.

Making Predictions

After our network has been trained, we can proceed to make predictions. We will be making predictions for a future week beyond our time period.

Once we have trained our model with the model.fit() method, making predictions is simple:

model.predict(x=X_train)

We use the same data for making predictions as the data used for training (the X_train variable). If we have more data available, we can use that instead—given that we reshape it to the format the LSTM requires.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.